from Base import message, intersect, SS_VALID
from DRG import MDCF_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["37.3306","00.6700x001","00.6701","37.0x00x003","37.1000x004","37.1000x007","37.1000x008","37.1100x004","37.1100x006","37.1100x008","37.1100x009","37.1101","37.1102","37.1103","37.1104","37.1200x005","37.1200x008","37.1200x009","37.1200x010","37.1200x011","37.1201","37.1202","37.1203","37.1204","37.2400","37.2401","37.2500x001","37.2501","37.3100x006","37.3101","37.3102","37.3103","37.3104","37.3300x008","37.3300x024","37.3301","37.3305","37.3701","37.3703","37.3704","37.4100","37.4900x001","37.4900x002","37.4900x005","37.4900x014","37.4900x015","37.4900x016","37.4901","37.4902","37.4903","37.7901","37.7902","37.9000x001","37.9100","37.9300x001","38.0500x002"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合FJ1入组条件，匹配规则：主手术匹配')

    if MDCF_DRG.FJ19_group(record):
      return 'FJ19'
        
    return 'FJ1'
  else:
    return ''
    
